﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Frame.Lib.Core.Cache.Company
{
    public class CompanyContainer
    {
        public Dictionary<int, string> ConnectionStrings
        {
            get;
            set;
        }
       
        public override string ToString()
        {
            XElement root = new XElement("CompanyContainer");

            foreach (int key in ConnectionStrings.Keys)
            {

                XElement ele = new XElement("ConnectionString");
                ele.Add(new XAttribute("key", key));
                ele.Add(new XAttribute("Value", ConnectionStrings[key]));

                root.Add(ele);
            }

            return root.ToString();
        }
    }
}
